<?php 
//获得栏目url
function getCategoryUrl($field)
{
	switch ($field['url_type']) {
		case '2':
			return __ROOT__.'/cc/'.$field['html_dir'].'/index.html';
			break;
		
		default:
			return U('Index/Index/category',array('cid'=>$field['cid']));
	}
}

//获得内容url
function getContentUrl($field)
{
	switch ($field['url_type']) {
		case '2':
			$search=array('{y}','{m}','{d}','{aid}');
			$date = getdate($field['addtime']);
			$replace=array($date['year'],$date['mon'],$date['mday'],$field['aid']);
			return	__ROOT__.'/cc/'.$field['html_dir'].'/'.str_replace($search, $replace, $field['arc_html_rule']);
			break;
		
		default:
		return U('Index/Index/content',array('aid'=>$field['aid']));

	}
}

 ?>